tricks for finding all topologies on a set